package cn.lanqiao.springbootproject.mapper;

import cn.lanqiao.springbootproject.entity.Menu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * (Menu)对象数据库访问层
 *
 * @author david
 * @since 2024-09-28 09:47:21
 */
@Mapper
public interface MenuMapper {

    /**
     * 多条件查询，分页通过PageHelper
     *
     * @param roleId
     * @return
     */
    @Select("select * from menu where menu_id in (select menu_id from role_menu where role_id = #{roleId})")
    List<Menu> queryByRoleId(int roleId);

}
